package com.eclipse.org.snms.serializer.actions;

import java.io.IOException;
import java.text.ParseException;

import com.eclipse.org.snms.reminder.ReminderObserver;
import com.eclipse.org.snms.reminder.ReminderSubject;
import com.eclipse.org.snms.reminder.ReminderSubjectConcrete;
import com.eclipse.org.snms.serializer.loadStickyNotes.SerializerConcreteSubject;
import com.eclipse.org.snms.serializer.storageAccess.*;
import com.eclipse.org.snms.serializer.updateStickyNote.ConcreteObserver;
import com.eclipse.org.snms.summary.SummaryObserver;
/**
 * 
 * @author david
 *
 */
public class StartUp implements org.eclipse.ui.IStartup{

	
	public void earlyStartup() {
		ReminderSubjectConcrete rsc=new ReminderSubjectConcrete();
		rsc.subscribe(new ConcreteObserver());
				
		StorageAccess storageAccess = StorageAccess.getUniqueInstance();
		try {
			storageAccess.readXML();
			SerializerConcreteSubject scs=new SerializerConcreteSubject();
			scs.notifyObservers();
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	

}
